<link rel="import" href="packages/spark_widgets/spark_button/spark_button.html">

<polymer-element name="example-ui">
  <template>
    <link rel="stylesheet" href="../common/example_ui.css">

    <style>
      :host {
        display: flex;
        flex-flow: row;
      }
      #instance {
        display: flex;
        align-items: center;
        height: 50px;
        width: 400px;
      }
      #buttonCont {
        display: flex;
        justify-content: center;
        width: 100px;
      }
      #icon {
        width: 24px;
        height: 24px;
      }
      #attrs {
        font-family: sans-serif;
        font-size: 12px;
      }
    </style>

    <template repeat="{{round in [false, true]}}">
      <span>
        <template repeat="{{active in [false, true]}}">
          <template repeat="{{raised in [false, true]}}">
            <template repeat="{{primary in [false, true]}}">
              <template repeat="{{padding in ['none', 'small', 'medium', 'large', 'huge']}}">
                <div id="instance">
                  <div id="buttonCont">
                    <spark-button id="button"
                        round?="{{round}}"
                        raised?="{{raised}}"
                        active?="{{active}}"
                        primary?="{{primary}}"
                        padding="{{padding}}">
                      <template if="{{!round}}">
                        Button
                      </template>
                      <template if="{{round}}">
                        <svg id="icon" viewBox="0 0 24 24">
                          <polygon points="8,5 8,19 19,12 "></polygon>
                        </svg>
                      </template>
                    </spark-button>
                  </div>
                  <span id="attrs">
                    <template if="{{round}}">[round]</template>
                    <template if="{{active}}">[active]</template>
                    <template if="{{raised}}">[raised]</template>
                    <template if="{{primary}}">[primary]</template>
                    [padding={{padding}}]
                  </span>
                </div>
              </template>
            </template>
          </template>
        </template>
      </span>
    </template>
  </template>

  <script type="application/dart" src="example_ui.dart"></script>
</polymer-element>
